#ifndef _GRAPHICS_HEADER_
#define _GRAPHICS_HEADER_

#include <SDL.h>
#include <SDL_main.h>
#include <GL/glew.h>
#include <gl\GLU.h>
#include <SDL_opengl.h>
#include <glm\glm.hpp>
#include "Mesh.h"
#include "Shader.h"
#include <list>

using namespace std;
using namespace glm;

class SceneObject;

struct GFXSettings{
	bool vsync;
	bool doubleBuffer;
	bool fullScreen;
	int scrnW;
	int scrnH;
	int AALevel;
	int glLevel;
};

struct ShaderInfo{
	string vert;
	string frag;
	string geom;
};

struct Colour{
	Colour();
	Colour(float nR, float nG, float nB, float nA);
	float r, g, b, a;
};

namespace gfx{
	static GFXSettings gfxSettings;
	static SDL_Window *window;
	static SDL_GLContext context;
	extern mat4 projectionMatrix;
	extern mat4 viewMatrix;
	static Colour bgColour;

	void Initialise();
	void DestroyRenderer();
	void SetBackgroundColour(Colour col);
	void SwapBuffers();
	GFXSettings LoadConfigs(list<string> cfg);
	GFXSettings LoadDefaultConfigs();
};

#endif // _GRPAHICS_HEADER